#ifndef LOAD_BALANCE_H
#define LOAD_BALANCE_H

#include <functional>
#include <string.h>
#include <vector>
#include <iostream>
#include "Service.h"

// 负载均衡回调函数类型：接受服务名称和服务实例列表，返回选中的服务实例
//using LoadBalanceCallback = std::function<ServiceItem(const std::string&, const std::vector<ServiceItem>&)>;

class LoadBalanceStrategy {
public:
    virtual ServiceItem Select(const std::string& name, const std::vector<ServiceItem>& services) = 0;
};

#endif
